package demo3;

import demo2.Test1;

class Student{

}


class Teacher{

}
class  School{
    public Student[]  students;//类 类型作为成员变量 这种思想叫做组合
    public Teacher[] teachers;


    public School(){
        this.students = new Student[10];
        this.teachers = new Teacher[10];
    }
}


public class Test2 extends Test1 {

    public void fun(){
        System.out.println(super.a);//不同包之间父类成员变量的访问用super

    }
    public static void main(String[] args) {
        //System.out.println(test1.a); 不能直接输出
        Test2 test2 = new Test2();
        test2.fun();
    }
}
